package com.config.exception;


import com.common.ErrorCode;
import lombok.Data;

@Data
public class GlobalException extends RuntimeException {
    private String code;
    private String msg;

    private GlobalException() {
        super();
    }

    public GlobalException(ErrorCode errorCode) {
        super(errorCode.getMsg());
        this.msg = errorCode.getMsg();
        this.code = errorCode.getCode();
    }


}
